<html>
    <head>
        <title>Nettbutikk</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="CSS/style.css" />
    </head>
    <body>
        <div class="sidebar">
            <h2>Kategorier</h2>
            <?php
                $categories = $db-> query("SELECT * FROM itemcategory");
                echo "<table>";
                    while($row = $categories->fetch()){
                       $category = $row['name'];?>
                       <tr><td>
                       <a href="category.php?cat=<?php echo$category?>"><?php echo$category?></a>
                       </td></tr>
                   <?php }
                echo"</table>";
            ?>
        </div>
    </body>
</html>